@extends('layout.admin')

@section('title','商品分类列表')

@section('content')
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf">商品分类列表</div>
                </div>
					
					<form action="#" method="get">
	                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-3" style="float:right">
		                        <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
		                            <input type="text" name="keyword" value="{{$request->input('keyword')}}" class="am-form-field ">
		                            <span class="am-input-group-btn">
		    							<button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="submit">搜索</button>
		  							</span>
		                        </div>
	                    </div>
                    </form>
                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                                <tr>
                                    <th>id</th>
                                    <th>店铺id</th>
                                    <th>商品分类名称</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
								@foreach($data as $v)
                                <tr class="gradeX">
                                    
                                    <td class="am-text-middle">{{$v->id}}</td>
                                    <td class="am-text-middle">{{session('pid')}}</td>
                                    <td class="am-text-middle">{{$v->typename}}</td>
                                                                      
                                    <td class="am-text-ｍiddle">
                                        <div class="tpl-table-black-operation">
                                            <a href="/type/edit?id={{$v->id}}">
                                                <i class="am-icon-pencil"></i> 编辑
                                            </a>                                          
                                            <a href="/type/delete?id={{$v->id}}" class="tpl-table-black-operation-del">
                                                <i class="am-icon-trash"></i> 删除
                                            </a>
                                        </div>
                                    </td>
                                </tr>
								@endforeach
                                <!-- more data -->
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr">
                            <style>
								
								#pages li{
								    list-style: none;
								    padding: 0;
								    margin: 0;
								    display: inline-block;
								}
								#pages>ul>li>a,#pages>ul>li>span{
									color: #23abf0;
								    border-radius: 3px;
								    padding: 6px 12px;
								}
								
								#pages>ul>li>a,#pages>ul>li>span{
								    position: relative;
								    display: block;
								    text-decoration: none;
								    line-height: 1.2;
								    background-color: #fff;
								    border: 1px solid #ddd;
								    margin-bottom: 5px;
								    margin-right: 5px;
								}
								#pages ul .disabled span{
									color: #23abf0;									
								}								
								#pages ul .active span{
									background: #23abf0;
								    color: #fff;
								    border: 1px solid #23abf0;
								    padding: 6px 12px;
								}
								#pages>ul>li>a:hover{
								    background-color: #eee;
								}
								#pages ul .disabled span{
								    background-color: #fff;
								    border-color: #ddd;
								    cursor: not-allowed;
								    pointer-events: none;
								}
							</style>
                            <div id="pages">
                                {!! $data->appends($request->all())->render() !!}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection